<?php switch($content_type){
case 'rde_dt': ?>
<dl>
    <dd class="cp-header">
        <?php echo $text_topics_deleted_intro; ?>
        <select id="fid" name="fid">
            <?php if($has_global_privilege){ ?>
            <option value=""><?php echo $text_all_forum; ?></option>
            <?php } ?>
            <?php foreach($forums as $forum){ ?>
            <option value="<?php echo $forum['forum_id']; ?>" <?php echo $forum_option_id==$forum['forum_id']?'selected="selected"':'' ?>><?php echo $forum['forum_name']; ?></option>
            <?php foreach($sub_forums[$forum['forum_id']] as $sub_forum){ ?>
                <option value="<?php echo $sub_forum['forum_id']; ?>" <?php echo $forum_option_id==$sub_forum['forum_id']?'selected="selected"':'' ?>>&nbsp;&nbsp;<?php echo $sub_forum['forum_name']; ?></option>
                <?php } ?>
            <?php } ?>
        </select>
    </dd>
    <dd class="cp-content">
    <?php if(!$deleted_topics){ ?>
        <dl>
            <dd><?php echo $text_no_topics_deleted; ?></dd>
        </dl>
    <?php }else{ ?>
        <form id="deleted-topic-form" name="deleted-topic-form" action="" method="post">
        <dl class="cp-list-heading">
            <dd class="cp-list-heading-first cp-list-first-unindent2"><?php echo $text_heading_view_details; ?></dd>
            <dd class="cp-list-heading-second cp-list-second-expand2"><?php echo $text_heading_location; ?></dd>
            <dd class="cp-list-heading-third"><?php echo $text_heading_mark; ?></dd>
        </dl>
        <?php foreach($deleted_topics as $deleted_topic){ ?>
        <dl class="cp-list">
            <dd class="cp-list-first cp-list-first-unindent">
               <strong><?php echo $deleted_topic['topic_title']; ?></strong><br />
                <?php echo $deleted_topic['posted_by']; ?>
            </dd>
            <dd class="cp-list-second cp-list-second-expand">
                <?php echo $text_forum; ?>&nbsp;&nbsp;<a href="<?php echo $deleted_topic['fourm_link']; ?>"><?php echo $deleted_topic['forum_name']; ?></a>
            </dd>
            <dd class="cp-list-third">
                <input type="checkbox" name="marked_t_id[]" value="<?php echo $deleted_topic['topic_id'] ; ?>" />
            </dd>
        </dl>
        <?php } ?>
        <dl class="cp-list-bottom">
            <dd>
                <input class="input-buttons" type="submit" name="restore" value="<?php echo $button_restore; ?>" onclick="{if(confirm('<?php echo $text_confirm_submit; ?>')){this.document.deleted-topic-form.submit();return true;}return false;}" />
                &nbsp;&nbsp;
                <input class="input-buttons" type="submit" name="clear-marked" value="<?php echo $button_clear_marked; ?>" onclick="{if(confirm('<?php echo $text_confirm_submit; ?>')){this.document.deleted-topic-form.submit();return true;}return false;}" />
                &nbsp;&nbsp;
                <input class="input-buttons" type="submit" name="clear-all" value="<?php echo $button_clear_all; ?>" onclick="{if(confirm('<?php echo $text_confirm_submit; ?>')){this.document.deleted-topic-form.submit();return true;}return false;}" />
            </dd>
            <?php if(count($deleted_topics)>1){ ?>
            <dd style="float:left;">
                &bull; <a href="#" onclick="marklist('deleted-topic-form', 'marked_t', true); return false;"><?php echo $text_mark_all; ?></a>
                &bull; <a href="#" onclick="marklist('deleted-topic-form', 'marked_t', false); return false;"><?php echo $text_unmark_all; ?></a>
            </dd>
            <?php } ?>
        </dl>
        <div class="forum-pagination"><?php echo $pagination; ?></div>
        </form>
    <?php } ?>
    </dd>
</dl>
<script type="text/javascript"><!--
$('#fid').bind('change', function() {
    url = 'index.php?route=community/mcp&mode=rde&action=dt';

    var keyword = $('.cp-header select[name=\'fid\']').attr('value');

    if(keyword != ''){
        url += '&fid=' + encodeURIComponent(keyword);
    }

    location = url;
});
--></script>
<?php break; ?>
<?php case 'rde_dp': ?>
<dl>
    <dd class="cp-header">
        <?php echo $text_posts_deleted_intro; ?>
        <select id="fid" name="fid">
            <?php if($has_global_privilege){ ?>
            <option value=""><?php echo $text_all_forum; ?></option>
            <?php } ?>
            <?php foreach($forums as $forum){ ?>
            <option value="<?php echo $forum['forum_id']; ?>" <?php echo $forum_option_id==$forum['forum_id']?'selected="selected"':'' ?>><?php echo $forum['forum_name']; ?></option>
            <?php foreach($sub_forums[$forum['forum_id']] as $sub_forum){ ?>
                <option value="<?php echo $sub_forum['forum_id']; ?>" <?php echo $forum_option_id==$sub_forum['forum_id']?'selected="selected"':'' ?>>&nbsp;&nbsp;<?php echo $sub_forum['forum_name']; ?></option>
                <?php } ?>
            <?php } ?>
        </select>
    </dd>
    <dd class="cp-content">
        <?php if(!$deleted_posts){ ?>
        <dl>
            <dd><?php echo $text_no_posts_deleted; ?></dd>
        </dl>
        <?php }else{ ?>
        <form id="deleted-post-form" name="deleted-post-form" action="" method="post">
        <dl class="cp-list-heading">
            <dd class="cp-list-heading-first cp-list-first-unindent2"><?php echo $text_heading_view_details; ?></dd>
            <dd class="cp-list-heading-second cp-list-second-expand2"><?php echo $text_heading_location; ?></dd>
            <dd class="cp-list-heading-third"><?php echo $text_heading_mark; ?></dd>
        </dl>
        <?php foreach($deleted_posts as $deleted_post){ ?>
        <dl class="cp-list">
            <dd class="cp-list-first cp-list-first-unindent">
                <strong><?php echo $deleted_post['post_subject']; ?></strong><br />
                <?php echo $deleted_post['posted_by']; ?>
            </dd>
            <dd class="cp-list-second cp-list-second-expand">
                <?php echo $text_topic; ?>&nbsp;&nbsp;<a href="<?php echo $deleted_post['topic_link']; ?>"><?php echo $deleted_post['topic_title']; ?></a><br />
                <?php echo $text_forum; ?>&nbsp;&nbsp;<a href="<?php echo $deleted_post['fourm_link']; ?>"><?php echo $deleted_post['forum_name']; ?></a>
            </dd>
            <dd class="cp-list-third">
                <input type="checkbox" name="marked_p_id[]" value="<?php echo $deleted_post['id_str'] ; ?>" />
            </dd>
        </dl>
        <?php } ?>
        <dl class="cp-list-bottom">
            <dd>
                <input class="input-buttons" type="submit" name="restore" value="<?php echo $button_restore; ?>" onclick="{if(confirm('<?php echo $text_confirm_submit; ?>')){this.document.deleted-post-form.submit();return true;}return false;}" />
                &nbsp;&nbsp;
                <input class="input-buttons" type="submit" name="clear-marked" value="<?php echo $button_clear_marked; ?>" onclick="{if(confirm('<?php echo $text_confirm_submit; ?>')){this.document.deleted-post-form.submit();return true;}return false;}" />
                &nbsp;&nbsp;
                <input class="input-buttons" type="submit" name="clear-all" value="<?php echo $button_clear_all; ?>" onclick="{if(confirm('<?php echo $text_confirm_submit; ?>')){this.document.deleted-post-form.submit();return true;}return false;}" />
            </dd>
            <?php if(count($deleted_posts)>1){ ?>
            <dd style="float:left;">
                &bull; <a href="#" onclick="marklist('deleted-post-form', 'marked_p', true); return false;"><?php echo $text_mark_all; ?></a>
                &bull; <a href="#" onclick="marklist('deleted-post-form', 'marked_p', false); return false;"><?php echo $text_unmark_all; ?></a>
            </dd>
            <?php } ?>
        </dl>
        <div class="forum-pagination"><?php echo $pagination; ?></div>
        </form>
        <?php } ?>
    </dd>
</dl>
<script type="text/javascript"><!--
$('#fid').bind('change', function() {
    url = 'index.php?route=community/mcp&mode=rde&action=dp';

    var keyword = $('.cp-header select[name=\'fid\']').attr('value');

    if(keyword != ''){
        url += '&fid=' + encodeURIComponent(keyword);
    }

    location = url;
});
--></script>
<?php break; ?>
<?php } ?>